VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "msflxgrd.ocx"
Object = "{736A8444-E374-41A8-B526-1B07FD2F3F5B}#1.0#0"; "BLacKPeaRLOCX.ocx"
Begin VB.Form FrmPemakaianMember 
   BackColor       =   &H00000000&
   BorderStyle     =   0  'None
   ClientHeight    =   7575
   ClientLeft      =   0
   ClientTop       =   30
   ClientWidth     =   7680
   Icon            =   "FrmPemakaianMember.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   7575
   ScaleWidth      =   7680
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin BLacKPeaRLOCX.BLacKFrame BLacKFrame4 
      Height          =   7575
      Left            =   0
      TabIndex        =   4
      Top             =   0
      Width           =   7695
      _ExtentX        =   13573
      _ExtentY        =   13361
      BackColor1      =   0
      BackColor2      =   4210752
      Caption         =   "Sisa Saldo Member"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   49152
      TitleColor1     =   8421504
      TitleColor2     =   0
      TitleGradient   =   2
      TitleHeight     =   450
      BorderColor     =   49152
      BorderWidth     =   2
      Begin BLacKPeaRLOCX.BLacKFrame BLacKFrame3 
         Height          =   855
         Left            =   120
         TabIndex        =   7
         Top             =   6360
         Width           =   7455
         _ExtentX        =   13150
         _ExtentY        =   1508
         BackColor1      =   0
         BackColor2      =   4210752
         Caption         =   ""
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   8421504
         TitleColor1     =   0
         TitleColor2     =   4210752
         TitleHeight     =   350
         BorderColor     =   49152
         BorderWidth     =   2
         Begin BLacKPeaRLOCX.ButtonNix CmdTutup 
            Height          =   375
            Left            =   5040
            TabIndex        =   3
            Top             =   240
            Width           =   2055
            _ExtentX        =   3625
            _ExtentY        =   661
            BTYPE           =   5
            TX              =   "Tutup"
            ENAB            =   -1  'True
            BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            COLTYPE         =   2
            FOCUSR          =   0   'False
            BCOL            =   1184274
            BCOLO           =   16777215
            FCOL            =   49152
            FCOLO           =   49152
            MCOL            =   12632256
            MPTR            =   1
            MICON           =   "FrmPemakaianMember.frx":B532
            UMCOL           =   -1  'True
            SOFT            =   0   'False
            PICPOS          =   0
            NGREY           =   0   'False
            FX              =   0
            HAND            =   0   'False
            CHECK           =   0   'False
            VALUE           =   0   'False
         End
         Begin BLacKPeaRLOCX.ButtonNix CmdRefresh 
            Height          =   375
            Left            =   360
            TabIndex        =   2
            Top             =   240
            Width           =   1935
            _ExtentX        =   3413
            _ExtentY        =   661
            BTYPE           =   5
            TX              =   "Segarkan"
            ENAB            =   -1  'True
            BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            COLTYPE         =   2
            FOCUSR          =   0   'False
            BCOL            =   1184274
            BCOLO           =   16777215
            FCOL            =   49152
            FCOLO           =   49152
            MCOL            =   12632256
            MPTR            =   1
            MICON           =   "FrmPemakaianMember.frx":B54E
            UMCOL           =   -1  'True
            SOFT            =   0   'False
            PICPOS          =   0
            NGREY           =   0   'False
            FX              =   0
            HAND            =   0   'False
            CHECK           =   0   'False
            VALUE           =   0   'False
         End
      End
      Begin BLacKPeaRLOCX.BLacKFrame BLacKFrame2 
         Height          =   2775
         Left            =   120
         TabIndex        =   6
         Top             =   600
         Width           =   7455
         _ExtentX        =   13150
         _ExtentY        =   4895
         BackColor1      =   0
         BackColor2      =   4210752
         Caption         =   "    Members"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   49152
         TextPosition    =   0
         TitleColor1     =   0
         TitleColor2     =   4210752
         TitleGradient   =   2
         TitleHeight     =   350
         BorderColor     =   49152
         BorderWidth     =   2
         Begin MSFlexGridLib.MSFlexGrid GridMember 
            Height          =   2175
            Left            =   120
            TabIndex        =   0
            Top             =   480
            Width           =   7215
            _ExtentX        =   12726
            _ExtentY        =   3836
            _Version        =   393216
            Cols            =   5
            BackColor       =   0
            ForeColor       =   49152
            BackColorFixed  =   3158064
            ForeColorFixed  =   49152
            ForeColorSel    =   192
            BackColorBkg    =   0
            GridColor       =   16384
            GridColorFixed  =   16384
            AllowUserResizing=   1
            Appearance      =   0
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "OCR A Extended"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
         End
      End
      Begin BLacKPeaRLOCX.BLacKFrame BLacKFrame1 
         Height          =   2655
         Left            =   120
         TabIndex        =   5
         Top             =   3480
         Width           =   7455
         _ExtentX        =   13150
         _ExtentY        =   4683
         BackColor1      =   0
         BackColor2      =   4210752
         Caption         =   "    Detail Pemakaian"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   49152
         TextPosition    =   0
         TitleColor1     =   0
         TitleColor2     =   4210752
         TitleGradient   =   2
         TitleHeight     =   350
         BorderColor     =   49152
         BorderWidth     =   2
         Begin MSFlexGridLib.MSFlexGrid GridPemakaian 
            Height          =   1935
            Left            =   120
            TabIndex        =   1
            Top             =   600
            Width           =   7215
            _ExtentX        =   12726
            _ExtentY        =   3413
            _Version        =   393216
            Cols            =   5
            BackColor       =   0
            ForeColor       =   49152
            BackColorFixed  =   3158064
            ForeColorFixed  =   49152
            ForeColorSel    =   192
            BackColorBkg    =   0
            GridColor       =   16384
            GridColorFixed  =   16384
            Appearance      =   0
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "OCR A Extended"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
         End
      End
   End
End
Attribute VB_Name = "FrmPemakaianMember"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CekSaldo()
On Error GoTo hell
    rec.Open "SELECT member.* FROM member", conn, adOpenStatic, adLockOptimistic
    If Not rec.RecordCount = 0 Then
        GridMember.Rows = rec.RecordCount + 1
        rec.MoveFirst
        For i = 1 To rec.RecordCount
            GridMember.TextMatrix(i, 0) = rec(0) 'user name
            GridMember.TextMatrix(i, 1) = rec(1) 'nama
            GridMember.TextMatrix(i, 2) = rec(2) 'alamat
            GridMember.TextMatrix(i, 3) = rec(3) 'telp
            GridMember.TextMatrix(i, 4) = Format(rec(5), "##,###,###") 'deposit
            rec.MoveNext
        Next i
    Else
        GridMember.Rows = 1
    End If
    rec.Close
IfNoErr:
Exit Sub
hell:
 'MsgBox "An Error In " & Me.Name & ". See Error.log for detail", vbCritical, "Error Handling"
 TulisError Err.Description, Err.Number, "CekSaldo", Me.Name
 Resume IfNoErr
End Sub

Private Sub CmdRefresh_Click()
    Call CekSaldo
End Sub

Private Sub CmdTutup_Click()
    Unload Me
End Sub

Private Sub Form_Load()
    Call AturGridMember
    Call AturGridPemakaian
    Call CekSaldo
    StyleS
End Sub
Private Sub AturGridMember()
    GridMember.TextMatrix(0, 0) = setNamaUser
    GridMember.TextMatrix(0, 1) = setNamaMember
    GridMember.TextMatrix(0, 2) = setAlamat
    GridMember.TextMatrix(0, 3) = setNoTelp
    GridMember.TextMatrix(0, 4) = setDeposit
    GridMember.ColWidth(0) = 1300
    GridMember.ColWidth(1) = 1500
    GridMember.ColWidth(2) = 1500
    GridMember.ColWidth(3) = 1400
    GridMember.ColWidth(4) = 1300
End Sub
Private Sub AturGridPemakaian()
    GridPemakaian.TextMatrix(0, 0) = setNota
    GridPemakaian.TextMatrix(0, 1) = setTanggal
    GridPemakaian.TextMatrix(0, 2) = setNo & "" & setClient
    GridPemakaian.TextMatrix(0, 3) = setDurasi
    GridPemakaian.TextMatrix(0, 4) = setTotal
    GridPemakaian.ColWidth(0) = 800
    GridPemakaian.ColWidth(1) = 1600
    GridPemakaian.ColWidth(2) = 1500
    GridPemakaian.ColWidth(3) = 1400
    GridPemakaian.ColWidth(4) = 1800
End Sub
Private Sub CekDetail()
On Error GoTo hell
    rec.Open "SELECT laporan.* FROM laporan WHERE laporan.user = '" & GridMember.TextMatrix(GridMember.Row, 0) & "' AND laporan.jenis = 'member'", conn, adOpenStatic, adLockOptimistic
    If Not rec.RecordCount = 0 Then
        GridPemakaian.Rows = rec.RecordCount + 1
        rec.MoveFirst
        For i = 1 To rec.RecordCount
            GridPemakaian.TextMatrix(i, 0) = rec(0) 'no nota
            GridPemakaian.TextMatrix(i, 1) = rec(1) 'tanggal
            GridPemakaian.TextMatrix(i, 2) = setClient & " " & rec(2) 'no client
            GridPemakaian.TextMatrix(i, 3) = rec(6) 'durasi
            GridPemakaian.TextMatrix(i, 4) = Format(rec(7), "##,###,###") 'total
            rec.MoveNext
        Next i
    Else
        GridPemakaian.Rows = 1
    End If
    rec.Close
IfNoErr:
Exit Sub
hell:
 'MsgBox "An Error In " & Me.Name & ". See Error.log for detail", vbCritical, "Error Handling"
 TulisError Err.Description, Err.Number, "CekDetail", Me.Name
 Resume IfNoErr

End Sub

Private Sub GridMember_Click()
    Call CekDetail
End Sub

Private Sub StyleS()
On Error Resume Next
Dim ctrl As Control
For Each ctrl In Controls
If FrmStyles.txtnamastyle.Text = "Default" Then
Exit Sub
Else
    If (TypeOf ctrl Is ButtonNix) And _
        ctrl.Name <> "cmdSwitchStyle" Then
        ctrl.ButtonType = FrmStyles.txtlButtonType.Text
        ctrl.ColorScheme = FrmStyles.txtlColorScheme.Text
        ctrl.Backcolor = FrmStyles.txtlBackcolor.Text
        ctrl.BackOver = FrmStyles.txtlBackOver.Text
        ctrl.Forecolor = FrmStyles.txtlForecolor.Text
        ctrl.ForeOver = FrmStyles.txtlForeOver.Text
       
    End If
        If (TypeOf ctrl Is BLacKFrame) And _
        ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.BackColor1 = FrmStyles.frameBackColor1.Text
         ctrl.BackColor2 = FrmStyles.frameBackColor2.Text
         ctrl.BorderColor = FrmStyles.frameBorderColor.Text
         ctrl.Forecolor = FrmStyles.frameForecolor.Text
         ctrl.TitleColor1 = FrmStyles.frameTitleColor1.Text
         ctrl.TitleColor2 = FrmStyles.frameTitleColor2.Text
         If FrmStyles.frameBackGradient.Text = 0 Then
         ctrl.BackGradient = None
         ElseIf FrmStyles.frameBackGradient.Text = 1 Then
         ctrl.BackGradient = Vertical
         ElseIf FrmStyles.frameBackGradient.Text = 2 Then
         ctrl.BackGradient = Horizontal
         End If
         
         If FrmStyles.Frametitlegradient.Text = 0 Then
         ctrl.TitleGradient = None
         ElseIf FrmStyles.Frametitlegradient.Text = 1 Then
         ctrl.TitleGradient = Vertical
         ElseIf FrmStyles.Frametitlegradient.Text = 2 Then
         ctrl.TitleGradient = Horizontal
         End If

    End If
        If (TypeOf ctrl Is BLacKText) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.TForecolor.Text
         ctrl.Backcolor = FrmStyles.TBackcolor.Text
         ctrl.BackColorMain = FrmStyles.TBackColorMain.Text
         ctrl.BorderColor = FrmStyles.TBorderColor.Text
         ctrl.FocusBackColor = FrmStyles.TFocusBackColor.Text
         ctrl.FocusBackMainColor = FrmStyles.TFocusBackMainColor.Text
         ctrl.FocusBorderColor = FrmStyles.TFocusBorderColor.Text
         ctrl.FocusForeColor = FrmStyles.TFocusForeColor.Text
    End If
        If (TypeOf ctrl Is MSFlexGrid) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Backcolor = FrmStyles.GDBackcolor.Text
         ctrl.BackColorBkg = FrmStyles.GDBackColorBkg.Text
         ctrl.BackColorSel = FrmStyles.GDBackColorSel.Text
         ctrl.BackColorFixed = FrmStyles.GDBackColorFixed.Text
         ctrl.ForeColorSel = FrmStyles.GDForeColorSel.Text
         ctrl.Forecolor = FrmStyles.GDForecolor.Text
         ctrl.ForeColorFixed = FrmStyles.GDForeColorFixed.Text
         ctrl.GridColor = FrmStyles.GDGridColor.Text
         ctrl.GridColorFixed = FrmStyles.GDGridColorFixed.Text
    End If
        If (TypeOf ctrl Is TextBox) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.lbltextfore.Text
         ctrl.Backcolor = FrmStyles.lbltextback.Text
    End If
        If (TypeOf ctrl Is ComboBox) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.cboForeColor.Text
         ctrl.Backcolor = FrmStyles.cboBackcolor.Text
    End If
        If (TypeOf ctrl Is Label) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.lblForeColor.Text
    End If
        If (TypeOf ctrl Is RichTextBox) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Backcolor = FrmStyles.RcBackcolor.Text
    End If
    
            If (TypeOf ctrl Is OptionButton) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.opForecolor.Text
         ctrl.Backcolor = FrmStyles.opBackcolor.Text
    End If
            If (TypeOf ctrl Is ListView) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Backcolor = FrmStyles.LBackColor.Text
    End If
    Me.Backcolor = FrmStyles.WFore.Text
    End If
Next ctrl
End Sub

